package ebcs.icop.auto.service;

import jplat.core.trans.JTransContext;
import jplat.error.exception.JTransException;
import ebcs.plat.trans.base.BCSTransBaseV1;
import ebcs.plat.trans.base.KTransResponse;
import jplat.tools.coder.JsonCoder;
import jplat.tools.string.XLog;

import org.springframework.stereotype.Service;

import ebcs.icop.auto.transmodel.ECMQ00003RspModel;
import ebcs.icop.auto.transmodel.POMQ00009ReqModel;
import ebcs.icop.auto.transmodel.POMQ00009RspModel;
import ebcs.icop.auto.transmodel.POMQ00013ReqModel;
import ebcs.icop.auto.transmodel.POMQ00013RspModel;

/**
 * 渠道接口: POMQ00013
 * @author autocode generated by yx
 * @date 2017/03/28/10:36:43
 * @comment 订单报表查询.
 * @charset utf-8
 */
 
 @Service
public class POMQ00013ICOPService extends BCSTransBaseV1
{
	public POMQ00013RspModel callService( JTransContext transCtx, POMQ00013ReqModel icopReqModel ) throws JTransException
	{
		//按照报文版本初始化交易上线文.
		if ( !initTransContextV3(transCtx) )
		{
			transCtx.fail(KTransResponse.CD_INIT_TRANSCTX_FAIL, KTransResponse.MSG_INIT_TRANSCTX_FAIL);
			throw new JTransException(transCtx.getRetCode(), transCtx.getRetMsg());
		}
		
		transCtx.setTransCode("POMQ00013");
		transCtx.setReqBody(icopReqModel); 
		if( !doTrans(transCtx) )
		{
			throw new JTransException(transCtx.getRetCode(), transCtx.getRetMsg());
		}
		
		return transCtx.obtainRspBody(POMQ00013RspModel.class);
	}
	
	/*
	public static void main( String args[] ) throws JTransException
	{
		POMQ00013ICOPService service = new POMQ00013ICOPService();
		
		JTransContext transCtx = new JTransContext();
		
		//######
		//		copy the code to your code or test the icop-service;
		//######
		
		//JTransContext transCtx = appCtx.createTransContext();
		POMQ00013ReqModel icopReqModel = new POMQ00013ReqModel();
		icopReqModel.setOrderId(null);			//订单号 
		icopReqModel.setThirdId(null);			//第三方单号 
		icopReqModel.setPhone(null);			//手机号 
		icopReqModel.setStoreID(null);			//门店编号 
		icopReqModel.setOrderStat(null);			//订单状态 
		icopReqModel.setSettleStatus(null);			//结算状态 
		icopReqModel.setPayMethod(null);			//支付方式 
		icopReqModel.setBusiType(null);			//业务类型 
		icopReqModel.setStartDate(null);			//开始日期 
		icopReqModel.setEndDate(null);			//结束日期 
		icopReqModel.setPageSize(null);			//页面大小 
		icopReqModel.setPageNum(null);			//页码 

		//调用ICOP服务.
		POMQ00013RspModel icopRspModel = service.callService(transCtx, icopReqModel);
		
		//设置App返回值.
		
		XLog.log(JsonCoder.toJsonString(icopRspModel));
	}
	*/
	
}